import { Application } from 'egg';

export default (app: Application) => {
  const subRouter = app.router.namespace('/front');
  subRouter.get('businessCate', '/businessCate', app.controller.businessCate.getList);
  subRouter.get('businessInfo', '/businessInfo/:id', app.controller.businessInfo.getListByCate);
  subRouter.get('avatar', '/avatar', app.controller.avatar.find);
  subRouter.post('youngcard', '/youngcard', app.controller.youngCard.create);
  subRouter.get('getYoungcard', '/getYoungcard', app.controller.youngCard.getYoungCard);
  subRouter.get('getUserId', '/getUserId', app.controller.youngCard.getOpenId);
  subRouter.post('upload', '/upload', app.controller.common.upload);
  subRouter.get('map', '/map', app.controller.businessInfo.baiduMap);
}
